/*  This file is part of CASpp.

    CASpp is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    CASpp is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with CASpp.  If not, see <http://www.gnu.org/licenses/>.

    Copyright 2014 Jérome LAURENS

    See https://code.google.com/p/idalgo/

*/

#if !defined _CASPP_MODELS_FUNCTION_H_
#define _CASPP_MODELS_FUNCTION_H_

#include <string>
#include <vector>
#include <caspp/config.h>
#include <caspp/terminals/symbol.h>
#include <caspp/non_terminals/list.h>

CASPP_NS_BEGIN

CASPP_DECLARE_CLASS_REF(Function);

class Function {
public:
    typedef Function __self;
    typedef std::string name_t;
    typedef SymbolRef symbol_t;
    typedef ListRef   arguments_t;

    Function(const name_t &n);
    Function(const Symbol &n);
    Function(const SymbolRef &n);
    Function(const SymbolRef &n, const ListRef &l);

    SymbolRef & symbolRef();
    const SymbolRef & symbolRef() const;
    const name_t name() const;

    const ListRef & argumentsRef() const;
    ListRef &argumentsRef();

    const std::string description() const;
    const std::string longDescription() const;

private:
    symbol_t symbol_m;
    arguments_t arguments_m;
};

CASPP_NS_END

#endif // _CASPP_MODELS_FUNCTION_H_
